#include <iostream>
#include <fstream>
#include <string>

using std::cout;
using std::endl;
using std::ifstream;
using std::string;

void test(){
    //ifstream ifs;
    //ifs.open("text1.cpp");

    //string filename = "test3.cpp";
    //ifstream ifs3(filename);
    ifstream ifs("test2.txt");
    if(!ifs.good()){
        cout << "eorror" <<endl;
        return;
    }
    string word;
    //while(ifs >> word){
    //    cout << word;
    //}
    //cout<<endl;
    while(1){
        if(ifs>>word){
            cout << word;
        }

    }
    cout << endl;
    ifs.close();

}

int main()
{
    test();
    return 0;
}

